using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Overlay
{
    /// <summary>
    /// <para>Weighted Overlay</para>
    /// <para>Overlays several rasters using a common measurement scale and weights each according to its importance.</para>
    /// <para>使用通用测量比例叠加多个栅格，并根据栅格的重要性对栅格进行加权。</para>
    /// </summary>    
    [DisplayName("Weighted Overlay")]
    public class WeightedOverlay : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public WeightedOverlay()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_weighted_overlay_table">
        /// <para>Weighted overlay table</para>
        /// <para><xdoc>
        ///   <para>The weighted overlay table allows the calculation of a multiple-criteria analysis between several rasters.</para>
        ///   <para>Input Rasters:</para>
        ///   <bulletList>
        ///     <bullet_item>Rasters—List of input criteria rasters being weighted. Use the options to browse for raster datasets or add map layers to the list of inputs.</bullet_item><para/>
        ///     <bullet_item>%—The percent influence of the input raster compared to the other criteria rasters as a percentage of 100. Influences are specified by integer values only. Decimal values are rounded down to the nearest integer. The sum of influences must equal 100.
        ///     <para>Use the set equal influences option (the = sign button) to balance the percent influence of all rasters equally and sum them to 100.</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Remap Table:</para>
        ///   <bulletList>
        ///     <bullet_item>Field—The field of the input criteria to be weighted.</bullet_item><para/>
        ///     <bullet_item>Value—The input field value.</bullet_item><para/>
        ///     <bullet_item>Scale—The output scale value for the criterion, as specified by the Scale setting. Changing these values will alter the value in the input raster. You can enter a value directly or select from the drop-down list. In addition to numerical values, the following options are available:
        ///     <bulletList>
        ///       <bullet_item>Restricted—Assigns the restricted value (the minimum value of the evaluation scale set, minus one) to cells in the output, regardless of whether other input rasters have a different scale value set for that cell.  </bullet_item><para/>
        ///       <bullet_item>NoData—Assigns NoData to cells in the output, regardless of whether other input rasters have a different scale value set for that cell.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Scale—Evaluation scale for defining the remap values. Select from a list of predefined evaluation scales. You can also define your own evaluation scale controls by typing in the parameter sign hyphens or spaces to separate values. A negative value must be preceded by a space.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>加权叠加表允许计算多个栅格之间的多准则分析。</para>
        ///   <para>输入栅格：</para>
        ///   <bulletList>
        ///     <bullet_item>栅格 - 正在加权的输入条件栅格列表。使用这些选项浏览栅格数据集或将地图图层添加到输入列表中。</bullet_item><para/>
        /// <bullet_item>% - 输入栅格与其他条件栅格相比的影响百分比，以 100 的百分比表示。影响仅由整数值指定。十进制值向下舍入到最接近的整数。影响的总和必须等于 100。
        ///     <para>使用设置相等影响选项（= 符号按钮）可平均平衡所有栅格的影响百分比，并将其求和为 100。</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>重新映射表：</para>
        ///   <bulletList>
        ///     <bullet_item>字段 - 要加权的输入条件的字段。</bullet_item><para/>
        ///     <bullet_item>值 - 输入字段值。</bullet_item><para/>
        /// <bullet_item>比例 - 条件的输出比例值，由“比例”设置指定。更改这些值将更改输入栅格中的值。您可以直接输入值，也可以从下拉列表中进行选择。除数值外，还提供以下选项：
        ///     <bulletList>
        ///       <bullet_item>受限 - 将受限值（评估比例集的最小值减 1）分配给输出中的像元，而不管其他输入栅格是否为该像元设置了不同的比例值。</bullet_item><para/>
        ///       <bullet_item>NoData - 将 NoData 分配给输出中的像元，而不管其他输入栅格是否为该像元设置了不同的比例值。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>比例 - 用于定义重映射值的评估比例。从预定义的评估量表列表中进行选择。您还可以通过键入参数符号连字符或空格来分隔值来定义自己的评估量表控件。负值前面必须有一个空格。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output weighted raster.</para>
        /// <para>输出加权栅格。</para>
        /// </param>
        public WeightedOverlay(object _in_weighted_overlay_table, object _out_raster)
        {
            this._in_weighted_overlay_table = _in_weighted_overlay_table;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Weighted Overlay";

        public override string CallName => "sa.WeightedOverlay";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_weighted_overlay_table, _out_raster];

        /// <summary>
        /// <para>Weighted overlay table</para>
        /// <para><xdoc>
        ///   <para>The weighted overlay table allows the calculation of a multiple-criteria analysis between several rasters.</para>
        ///   <para>Input Rasters:</para>
        ///   <bulletList>
        ///     <bullet_item>Rasters—List of input criteria rasters being weighted. Use the options to browse for raster datasets or add map layers to the list of inputs.</bullet_item><para/>
        ///     <bullet_item>%—The percent influence of the input raster compared to the other criteria rasters as a percentage of 100. Influences are specified by integer values only. Decimal values are rounded down to the nearest integer. The sum of influences must equal 100.
        ///     <para>Use the set equal influences option (the = sign button) to balance the percent influence of all rasters equally and sum them to 100.</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Remap Table:</para>
        ///   <bulletList>
        ///     <bullet_item>Field—The field of the input criteria to be weighted.</bullet_item><para/>
        ///     <bullet_item>Value—The input field value.</bullet_item><para/>
        ///     <bullet_item>Scale—The output scale value for the criterion, as specified by the Scale setting. Changing these values will alter the value in the input raster. You can enter a value directly or select from the drop-down list. In addition to numerical values, the following options are available:
        ///     <bulletList>
        ///       <bullet_item>Restricted—Assigns the restricted value (the minimum value of the evaluation scale set, minus one) to cells in the output, regardless of whether other input rasters have a different scale value set for that cell.  </bullet_item><para/>
        ///       <bullet_item>NoData—Assigns NoData to cells in the output, regardless of whether other input rasters have a different scale value set for that cell.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Scale—Evaluation scale for defining the remap values. Select from a list of predefined evaluation scales. You can also define your own evaluation scale controls by typing in the parameter sign hyphens or spaces to separate values. A negative value must be preceded by a space.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>加权叠加表允许计算多个栅格之间的多准则分析。</para>
        ///   <para>输入栅格：</para>
        ///   <bulletList>
        ///     <bullet_item>栅格 - 正在加权的输入条件栅格列表。使用这些选项浏览栅格数据集或将地图图层添加到输入列表中。</bullet_item><para/>
        /// <bullet_item>% - 输入栅格与其他条件栅格相比的影响百分比，以 100 的百分比表示。影响仅由整数值指定。十进制值向下舍入到最接近的整数。影响的总和必须等于 100。
        ///     <para>使用设置相等影响选项（= 符号按钮）可平均平衡所有栅格的影响百分比，并将其求和为 100。</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>重新映射表：</para>
        ///   <bulletList>
        ///     <bullet_item>字段 - 要加权的输入条件的字段。</bullet_item><para/>
        ///     <bullet_item>值 - 输入字段值。</bullet_item><para/>
        /// <bullet_item>比例 - 条件的输出比例值，由“比例”设置指定。更改这些值将更改输入栅格中的值。您可以直接输入值，也可以从下拉列表中进行选择。除数值外，还提供以下选项：
        ///     <bulletList>
        ///       <bullet_item>受限 - 将受限值（评估比例集的最小值减 1）分配给输出中的像元，而不管其他输入栅格是否为该像元设置了不同的比例值。</bullet_item><para/>
        ///       <bullet_item>NoData - 将 NoData 分配给输出中的像元，而不管其他输入栅格是否为该像元设置了不同的比例值。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>比例 - 用于定义重映射值的评估比例。从预定义的评估量表列表中进行选择。您还可以通过键入参数符号连字符或空格来分隔值来定义自己的评估量表控件。负值前面必须有一个空格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weighted overlay table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_weighted_overlay_table { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output weighted raster.</para>
        /// <para>输出加权栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        public WeightedOverlay SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}